﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using SGRapidForm.Common;
using SGRapidForm.Permission.Entity;

namespace SGRapidForm.Permission.Service.Interface
{
    [ServiceContract(Namespace = "http://www.solutiongear.net/SGRapidForm/")]
    public interface IButtonService
    {
        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        bool Button_Add(ButtonEntity userDetails);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        bool Button_Delete(string keyid);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        bool Button_BulkDelete(string keyids);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        bool Button_Update(ButtonEntity userDetails);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        ButtonEntity Button_GetByKeyid(string keyid);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        List<ButtonEntity> Button_GetAll();

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        List<ButtonEntity> Button_PagingGet(Int32 startRecord, Int32 maxRecords, String sortColumns, String filterConditions);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        int Button_PagingGetCount(String filterConditions);

        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        List<ButtonEntity> Button_GetByPageKeyid(string keyid);

        /// <summary>
        /// 导入前检测按钮所属页面信息
        /// </summary>
        [OperationContract]
        [FaultContract(typeof(ServiceExceptionDetail))]
        bool Button_DetectBeforeImporting(string pageCode);

    }
}
